#include "PlayerMoveLeft.h"
#include "Weapon.h"
State* PlayerMoveLeft::instance=0;

PlayerMoveLeft::PlayerMoveLeft(vector<Image*> img) : State(img)
{

}

State* PlayerMoveLeft::getInstance()
{
    if(instance==0)
    {
        vector<Image*> img;
        Image* im = new Image("./Images/props.bmp");
        im->load();
        img.push_back(im);

        instance = new PlayerMoveLeft(img);
    }

    return instance;
}

 void PlayerMoveLeft::moveRight(Entity* player)
{
    player->setCurrentMoveSpeedX(10);
    player->setState(PlayerMoveRight::getInstance());
}

void PlayerMoveLeft::becomeIdle(Entity* player)
{
    player->setCurrentMoveSpeedX(0);
    player->setCurrentMoveSpeedY(0);
    player->setState(Idle::getInstance());
}

void PlayerMoveLeft::shoot(Entity* player)
{
   ( (Weapon*)player->getWeaponClip()->getclippedToMe()->getOwner())->shoot(-1,0);
}
